from flask import Blueprint, request
from service.comment_srvice import CommentService
from utils.response_utils import ResponseUtils

comment = Blueprint('comment', __name__)

@comment.route('/update_note_comment_like_count', methods=['POST'])
def update_note_comment_like_count():
    try:
        comment_id = request.get_json().get('comment_id')
        like_count = request.get_json().get('like_count')
        res = CommentService.update_note_comment_like_count(comment_id, like_count)
        return ResponseUtils.success(data=res)
    except Exception as e:
        return ResponseUtils.error(message=str(e), code=500)
    

